<?php
    include("public/includes/headerAdmin.php");
    include("public/includes/popup.php");
?>

<form action="./?rt=addContainer" class="form-validate" method="post" enctype="multipart/form-data" name="form1">
    <table width="1000" border="0" align="center" cellpadding="5" cellspacing="1">  
       <?php
        if(isset($_GET['action']) && $_GET['action'] =='edit'){
            echo '<input name="txtid" type="hidden" id="txtid" value="'.$_GET['id'].'">';
            echo '<input type="hidden" name="action" value="edit" />';            
        }
            
       ?>
         
        <tr class="a">
            <td bgcolor="#FFF6ED"><strong>Tiêu đề </strong></td>
            <td bgcolor="#FFF6ED"><label>
            <input name="txtten" type="text" id="txtten" size="40" class="required" 
                <?php echo 'value="'.$this->valueEdit['name'].'"'; ?>
            />
            </label></td>
        </tr>
        <tr class="a">
            <td bgcolor="#FFF6ED"><strong>Giới thiệu </strong></td>
            <td bgcolor="#FFF6ED"><label>
                <textarea name="txtgioithieu" cols="40" rows="5" id="txtgioithieu">
                    <?php echo $this->valueEdit['gioithieu']; ?>
                </textarea>
                </label>
            </td>
        </tr>
        <tr class="a">
            <td bgcolor="#FFF6ED"><strong>Nội dung </strong></td>
            <td bgcolor="#FFF6ED"><label>
            <input name="filenoidung" type="file" id="filenoidung" size="40"
            class="required"  
            />
        </label></td>
        </tr>
        <tr class="a">
            <td bgcolor="#FFF6ED"><strong>Địa điểm </strong></td>
                <td bgcolor="#FFF6ED"><label>
                <input name="txtdiadiem" type="text" id="txtdiadiem" size="40" 
                class="required" <?php echo 'value="'.$this->valueEdit['diadiem'].'"'; ?> />
                </label>
            </td>
        </tr>
        <tr class="a">
            <td bgcolor="#FFF6ED"><strong>Số điện thoại </strong></td>
            <td bgcolor="#FFF6ED"><label>
                <input name="txtsdt" type="text" id="txtsdt" class="number"
                <?php echo 'value="'.$this->valueEdit['sdt'].'"'; ?>/>
                </label>
            </td>
        </tr>
        <tr class="a">
            <td bgcolor="#FFF6ED"><strong>Ảnh</strong></td>
            <td bgcolor="#FFF6ED"><label>
                <input name="fileanh" type="file" id="fileanh" size="40" class="required">
                </label>
            </td>
        </tr>
        
        <tr class="a">
            <td bgcolor="#FFF6ED"><strong>Nguồn</strong></td>
            <td bgcolor="#FFF6ED"><label>
            <input name="txtnguon" type="text" id="txtnguon" size="40" 
                <?php echo 'value="'.$this->valueEdit['nguon'].'"'; ?>
             />
            </label>
            </td>
        </tr>
        <tr class="a">
            <td bgcolor="#FFF6ED"><strong>Chủ đề </strong></td>
            <td bgcolor="#FFF6ED">
                <select name="catid">        
                    <option value="danhlam">Danh lam thắng cảnh</option>
                    <option value="ditich">Di tích lịch sử</option>
                    <option value="khudulich">Khu du lịch</option>
                    <option value="nhahang">Nhà hàng</option>
                    <option value="khachsan">Khách sạn</option>
                    <option value="quanan">Quán ăn ngon</option>
                    <option value="cafe">Quán cafe</option>
                </select>	  
            </td>
        </tr>
        <tr class="a">
            <td bgcolor="#FFF6ED"><strong>Kinh tuyến </strong></td>
            <td bgcolor="#FFF6ED"><label>
            <input name="txtkinhdo" type="text" id="txtkinhdo" size="40" 
            <?php echo 'value="'.$this->valueEdit['kinhdo'].'"' ?>/>
            </label></td>
        </tr>
        <tr class="a">
            <td bgcolor="#FFF6ED"><strong>Vĩ tuyến </strong></td>
            <td bgcolor="#FFF6ED"><label>
            <input name="txtvido" type="text" id="txtvido" size="40" 
            <?php echo 'value="'.$this->valueEdit['vido'].'"'; ?>/>
            </label></td>
        </tr>
        <tr>
            <td colspan="2" align="center" bgcolor="#FFDCB9"><label>
            <input name="addnew" type="submit" id="addnew" onclick="return checkform();"
             <?php if(isset($_GET['action']) && $_GET['action']=='edit') echo  'value ="Update"'; else echo 'value = "Addnew"'; ?> />
            <input type="reset" name="Submit2" value="Reset"/>
            </label></td>
        </tr>
        </table>
</form>

<?php
     include("public/includes/footerAdmin.php");
?>
